//## begin module%3B88025A0209.cm preserve=no
//	  %X% %Q% %Z% %W%
//## end module%3B88025A0209.cm

//## begin module%3B88025A0209.cp preserve=no
//	+----------------------------------------------+
//	| SVMBR - A program for training SVMs          |
//	+----------------------------------------------+
//	| * Creator, modeling, coding:                 |
//	|    Marcelo Barros de Almeida                 |
//	|    barros@smar.com.br                        |
//	|    http://litc.cpdee.ufmg.br/~barros/        |
//	| * Coding, improvements, bug fixes:           |
//	|    Bernardo Penna                            |
//	|    bprc@brfree.com.br                        |
//	+----------------------------------------------+
//
//	 Copyright(c) 2002 by Marcelo Barros de Almeida
//	                            All rights reserved
//
//	-[CVS]------------------------------------------
//	$Author$
//	$Date$
//	$Source$
//	$Name$
//	$Revision$
//	------------------------------------------------
//## end module%3B88025A0209.cp

//## Module: kernel%3B88025A0209; Package specification
//## Subsystem: <Top Level>
//## Source file: D:\textotese\svmbr\src\kernel.h

#ifndef kernel_h
#define kernel_h 1

//## begin module%3B88025A0209.additionalIncludes preserve=no
//## end module%3B88025A0209.additionalIncludes

//## begin module%3B88025A0209.includes preserve=yes
//## end module%3B88025A0209.includes

// data
#include "data.h"
// global
#include "global.h"
//## begin module%3B88025A0209.declarations preserve=no
//## end module%3B88025A0209.declarations

//## begin module%3B88025A0209.additionalDeclarations preserve=yes
//## end module%3B88025A0209.additionalDeclarations


//## begin Kernel%3B87FC9D018F.preface preserve=yes
//## end Kernel%3B87FC9D018F.preface

//## Class: Kernel%3B87FC9D018F
//## Category: Kernel package%3B88052101ED
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class Kernel 
{
  //## begin Kernel%3B87FC9D018F.initialDeclarations preserve=yes
  //## end Kernel%3B87FC9D018F.initialDeclarations

  public:

    //## Other Operations (specified)
      //## Operation: evalKernel%998688369
      virtual REAL evalKernel (UINT i1, UINT i2) = 0;

      //## Operation: evalKernel%999139409
      virtual REAL evalKernel (REAL *vec, UINT i2) = 0;

      //## Operation: getkernelType%999139396
      SHORT getkernelType () const;

      //## Operation: getp1%999139398
      REAL getp1 () const;

      //## Operation: getp2%999139399
      REAL getp2 () const;

      //## Operation: getp3%999139400
      REAL getp3 () const;

    // Data Members for Class Attributes

      //## Attribute: RBF%3B880F360217
      //## begin Kernel::RBF%3B880F360217.attr preserve=no  public: static SHORT {U} 1
      static SHORT RBF;
      //## end Kernel::RBF%3B880F360217.attr

      //## Attribute: POLY%3B880F4000DB
      //## begin Kernel::POLY%3B880F4000DB.attr preserve=no  public: static SHORT {U} 2
      static SHORT POLY;
      //## end Kernel::POLY%3B880F4000DB.attr

      //## Attribute: LINEAR%3B880F520361
      //## begin Kernel::LINEAR%3B880F520361.attr preserve=no  public: static SHORT {U} 3
      static SHORT LINEAR;
      //## end Kernel::LINEAR%3B880F520361.attr

      //## Attribute: SIGMOID%3B88FFA60146
      //## begin Kernel::SIGMOID%3B88FFA60146.attr preserve=no  public: static SHORT {U} 4
      static SHORT SIGMOID;
      //## end Kernel::SIGMOID%3B88FFA60146.attr

    // Additional Public Declarations
      //## begin Kernel%3B87FC9D018F.public preserve=yes
      //## end Kernel%3B87FC9D018F.public

  protected:
    // Data Members for Class Attributes

      //## Attribute: p1%3B880EA2028C
      //## begin Kernel::p1%3B880EA2028C.attr preserve=no  protected: REAL {UA} 
      REAL p1;
      //## end Kernel::p1%3B880EA2028C.attr

      //## Attribute: p2%3B880EA800A0
      //## begin Kernel::p2%3B880EA800A0.attr preserve=no  protected: REAL {UA} 
      REAL p2;
      //## end Kernel::p2%3B880EA800A0.attr

      //## Attribute: p3%3B880EAC00A6
      //## begin Kernel::p3%3B880EAC00A6.attr preserve=no  protected: REAL {UA} 
      REAL p3;
      //## end Kernel::p3%3B880EAC00A6.attr

      //## Attribute: kernelType%3B8E53520167
      //## begin Kernel::kernelType%3B8E53520167.attr preserve=no  protected: SHORT {UA} 
      SHORT kernelType;
      //## end Kernel::kernelType%3B8E53520167.attr

    // Data Members for Associations

      //## Association: SVM package::<unnamed>%3B8817EC00A1
      //## Role: Kernel::data%3B8817ED0002
      //## begin Kernel::data%3B8817ED0002.role preserve=no  protected: Data { -> RHGAN}
      Data *data;
      //## end Kernel::data%3B8817ED0002.role

    // Additional Protected Declarations
      //## begin Kernel%3B87FC9D018F.protected preserve=yes
      //## end Kernel%3B87FC9D018F.protected

  private:
    // Additional Private Declarations
      //## begin Kernel%3B87FC9D018F.private preserve=yes
      //## end Kernel%3B87FC9D018F.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin Kernel%3B87FC9D018F.implementation preserve=yes
      //## end Kernel%3B87FC9D018F.implementation

};

//## begin Kernel%3B87FC9D018F.postscript preserve=yes
//## end Kernel%3B87FC9D018F.postscript

//## begin RBFKernel%3B87FC7102F4.preface preserve=yes
//## end RBFKernel%3B87FC7102F4.preface

//## Class: RBFKernel%3B87FC7102F4
//## Category: Kernel package%3B88052101ED
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class RBFKernel : public Kernel  //## Inherits: <unnamed>%3B87FCD40043
{
  //## begin RBFKernel%3B87FC7102F4.initialDeclarations preserve=yes
  //## end RBFKernel%3B87FC7102F4.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: RBFKernel%998688394
      RBFKernel (REAL p1v, REAL p2v, REAL p3v, Data *datap);

    //## Destructor (generated)
      ~RBFKernel();


    //## Other Operations (specified)
      //## Operation: evalKernel%998688370
      REAL evalKernel (UINT i1, UINT i2);

      //## Operation: evalKernel%999139410
      REAL evalKernel (REAL *vec, UINT i2);

    // Additional Public Declarations
      //## begin RBFKernel%3B87FC7102F4.public preserve=yes
      //## end RBFKernel%3B87FC7102F4.public

  protected:
    // Additional Protected Declarations
      //## begin RBFKernel%3B87FC7102F4.protected preserve=yes
      //## end RBFKernel%3B87FC7102F4.protected

  private:
    // Additional Private Declarations
      //## begin RBFKernel%3B87FC7102F4.private preserve=yes
      //## end RBFKernel%3B87FC7102F4.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin RBFKernel%3B87FC7102F4.implementation preserve=yes
      //## end RBFKernel%3B87FC7102F4.implementation

};

//## begin RBFKernel%3B87FC7102F4.postscript preserve=yes
//## end RBFKernel%3B87FC7102F4.postscript

//## begin SigmoidKernel%3B87FCA5024E.preface preserve=yes
//## end SigmoidKernel%3B87FCA5024E.preface

//## Class: SigmoidKernel%3B87FCA5024E
//## Category: Kernel package%3B88052101ED
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class SigmoidKernel : public Kernel  //## Inherits: <unnamed>%3B87FCDA00F6
{
  //## begin SigmoidKernel%3B87FCA5024E.initialDeclarations preserve=yes
  //## end SigmoidKernel%3B87FCA5024E.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: SigmoidKernel%998688395
      SigmoidKernel (REAL p1v, REAL p2v, REAL p3v, Data *datap);

    //## Destructor (generated)
      ~SigmoidKernel();


    //## Other Operations (specified)
      //## Operation: evalKernel%998688371
      REAL evalKernel (UINT i1, UINT i2);

      //## Operation: evalKernel%999139411
      REAL evalKernel (REAL *vec, UINT i2);

    // Additional Public Declarations
      //## begin SigmoidKernel%3B87FCA5024E.public preserve=yes
      //## end SigmoidKernel%3B87FCA5024E.public

  protected:
    // Additional Protected Declarations
      //## begin SigmoidKernel%3B87FCA5024E.protected preserve=yes
      //## end SigmoidKernel%3B87FCA5024E.protected

  private:
    // Additional Private Declarations
      //## begin SigmoidKernel%3B87FCA5024E.private preserve=yes
      //## end SigmoidKernel%3B87FCA5024E.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin SigmoidKernel%3B87FCA5024E.implementation preserve=yes
      //## end SigmoidKernel%3B87FCA5024E.implementation

};

//## begin SigmoidKernel%3B87FCA5024E.postscript preserve=yes
//## end SigmoidKernel%3B87FCA5024E.postscript

//## begin LinearKernel%3B87FCB90026.preface preserve=yes
//## end LinearKernel%3B87FCB90026.preface

//## Class: LinearKernel%3B87FCB90026
//## Category: Kernel package%3B88052101ED
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class LinearKernel : public Kernel  //## Inherits: <unnamed>%3B87FCE3038E
{
  //## begin LinearKernel%3B87FCB90026.initialDeclarations preserve=yes
  //## end LinearKernel%3B87FCB90026.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: LinearKernel%998688396
      LinearKernel (REAL p1v, REAL p2v, REAL p3v, Data *datap);

    //## Destructor (generated)
      ~LinearKernel();


    //## Other Operations (specified)
      //## Operation: evalKernel%998688372
      REAL evalKernel (UINT i1, UINT i2);

      //## Operation: evalKernel%999139412
      REAL evalKernel (REAL *vec, UINT i2);

    // Additional Public Declarations
      //## begin LinearKernel%3B87FCB90026.public preserve=yes
      //## end LinearKernel%3B87FCB90026.public

  protected:
    // Additional Protected Declarations
      //## begin LinearKernel%3B87FCB90026.protected preserve=yes
      //## end LinearKernel%3B87FCB90026.protected

  private:
    // Additional Private Declarations
      //## begin LinearKernel%3B87FCB90026.private preserve=yes
      //## end LinearKernel%3B87FCB90026.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin LinearKernel%3B87FCB90026.implementation preserve=yes
      //## end LinearKernel%3B87FCB90026.implementation

};

//## begin LinearKernel%3B87FCB90026.postscript preserve=yes
//## end LinearKernel%3B87FCB90026.postscript

//## begin PolyKernel%3B87FCC40086.preface preserve=yes
//## end PolyKernel%3B87FCC40086.preface

//## Class: PolyKernel%3B87FCC40086
//## Category: Kernel package%3B88052101ED
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

class PolyKernel : public Kernel  //## Inherits: <unnamed>%3B87FCED01A8
{
  //## begin PolyKernel%3B87FCC40086.initialDeclarations preserve=yes
  //## end PolyKernel%3B87FCC40086.initialDeclarations

  public:
    //## Constructors (specified)
      //## Operation: PolyKernel%998688397
      PolyKernel (REAL p1v, REAL p2v, REAL p3v, Data *datap);

    //## Destructor (generated)
      ~PolyKernel();


    //## Other Operations (specified)
      //## Operation: evalKernel%998688373
      REAL evalKernel (UINT i1, UINT i2);

      //## Operation: evalKernel%999139413
      REAL evalKernel (REAL *vec, UINT i2);

    // Additional Public Declarations
      //## begin PolyKernel%3B87FCC40086.public preserve=yes
      //## end PolyKernel%3B87FCC40086.public

  protected:
    // Additional Protected Declarations
      //## begin PolyKernel%3B87FCC40086.protected preserve=yes
      //## end PolyKernel%3B87FCC40086.protected

  private:
    // Additional Private Declarations
      //## begin PolyKernel%3B87FCC40086.private preserve=yes
      //## end PolyKernel%3B87FCC40086.private

  private: //## implementation
    // Additional Implementation Declarations
      //## begin PolyKernel%3B87FCC40086.implementation preserve=yes
      //## end PolyKernel%3B87FCC40086.implementation

};

//## begin PolyKernel%3B87FCC40086.postscript preserve=yes
//## end PolyKernel%3B87FCC40086.postscript

// Class Kernel 


//## Other Operations (inline)
inline SHORT Kernel::getkernelType () const
{
  //## begin Kernel::getkernelType%999139396.body preserve=yes
	return kernelType;
  //## end Kernel::getkernelType%999139396.body
}

inline REAL Kernel::getp1 () const
{
  //## begin Kernel::getp1%999139398.body preserve=yes
	return p1;
  //## end Kernel::getp1%999139398.body
}

inline REAL Kernel::getp2 () const
{
  //## begin Kernel::getp2%999139399.body preserve=yes
	return p2;
  //## end Kernel::getp2%999139399.body
}

inline REAL Kernel::getp3 () const
{
  //## begin Kernel::getp3%999139400.body preserve=yes
	return p3;
  //## end Kernel::getp3%999139400.body
}

// Class RBFKernel 

// Class SigmoidKernel 

// Class LinearKernel 

// Class PolyKernel 

//## begin module%3B88025A0209.epilog preserve=yes
//## end module%3B88025A0209.epilog


#endif
